<?php

use common\helpers\ArrayHelper;
use yii\widgets\ActiveForm;
use common\helpers\Url;
use common\enums\StatusEnum;

$form = ActiveForm::begin([
    'id' => $model->formName(),
    'enableAjaxValidation' => false,
    'class' => 'form-horizontal',
    'validationUrl' => Url::to(['edit-time', 'id' => $model['id']]),
    'fieldConfig' => [
        'template' => "<div class='col-sm-2 text-right'>{label}</div><div class='col-sm-10'>{input}\n{hint}\n{error}</div>",
    ]
]);
?>

<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
        </button>
        <ul class="nav nav-tabs">
            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">基本信息</a></li>
            <li><a data-toggle="tab" href="#tab-2" aria-expanded="false">价格设置</a></li>
        </ul>
    </div>
    <div class="modal-body">
    	<div class="tab-content rf-auto">
	    	<div class="tab-pane active" id="tab-1">
		    	<div class="form-group field-member-price">
		                <div class="col-sm-2 text-right"><label class="control-label" for="member-price">买卖方向</label></div>
		                <div class="col-sm-10">
		                    <select   class="form-control" id="rise_fall" name="rise_fall">
		                    	<option value="">请选择</option>
		                		<option value="all">全部</option>
		                		<option value="rise">买</option>
		                		<option value="fall">卖</option>
		            		</select>
		                    <div class="help-block"></div>
		                </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">T+N</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="trade_day" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">缩放倍数</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="zoom_size" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">合约量</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="contract_size" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">交易时间</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="trade_time" value="" placeholder="请严格按此格式输入：9:30-11:30|13:00-15:00">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <!--<div class="form-group field-member-price">
		                <div class="col-sm-2 text-right"><label class="control-label" for="member-price">可用杠杆</label></div>
		                <div class="col-sm-10">
		                	<?php
/*		                		foreach($lever as $k => $v){
		                	*/?>
		                    	<label><input type="checkbox" name="lever_id" value="<?/*= $v['id']*/?>"><?/*= $v['name']*/?></label>
							<?php /*
								}
							*/?>
		                    <div class="help-block"></div>
		                </div>
		        </div>-->
		         <div class="form-group field-member-price">
		                <div class="col-sm-2 text-right"><label class="control-label" for="member-price">上架</label></div>
		                <div class="col-sm-10">
		                    <label><input type="radio" name="on_sale" value="on">上架</label>
							<label><input type="radio" name="on_sale" value="off">下架</label>
		                    <div class="help-block"></div>
		                </div>
		        </div>
		        <div class="form-group field-member-price">
		                <div class="col-sm-2 text-right"><label class="control-label" for="member-price">状态</label></div>
		                <div class="col-sm-10">
		                    <label><input type="radio" name="status" value="1">启用</label>
							<label><input type="radio" name="status" value="0">禁用</label>
		                    <div class="help-block"></div>
		                </div>
		        </div>
		    </div>
		    <div class="tab-pane" id="tab-2">
		    	<div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">价格单位</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="unit" value="" placeholder="产品点位单位">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">单位单价</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="unit_price" value="" placeholder="换算人民币点位单价">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">价格步长</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="unit_step" value="" placeholder="用户设置止盈止损时，每次增加的最小点位数量">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">过夜费</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="overfee" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">收费时间</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="overtime" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">手续费</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="servicefee" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">保证金</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="deposit" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">最大止盈</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="maxrise" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">最小止盈</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="minrise" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">最大止损</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="maxlost" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		        <div class="form-group field-member-price">
		            <div class="col-sm-2 text-right"><label class="control-label" for="member-price">最小止损</label></div>
		            <div class="col-sm-10">
		                <input type="text" id="member-price" class="form-control" name="minlost" value="">
		                <div class="help-block"></div>
		            </div>
		        </div>
		    </div>
		</div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
        <button class="btn btn-primary" type="submit">保存</button>
    </div>
</div>

<?php ActiveForm::end(); ?>